@import '~antd/es/style/themes/default.less';
@import '~@/assets/stylesheet/common.less';

html,
body,
#root {
  height: 100%;
  textarea.ant-input {
    min-height: 80px;
  }
  .ant-select-multiple .ant-select-selection-item {
    box-shadow: 1px 2px 5px rgba(71, 119, 231, 0.25);
    background: #f9fafd;
  }
  .ant-modal-confirm {
    .ant-modal-body {
      padding: 32px 35px 32px;
    }
    .ant-modal-confirm-body-wrapper {
      text-align: center;
    }
    .ant-modal-confirm-btns {
      float: initial;
      .ok-button {
        .confim-button-style();
      }
      .cancel-button,
      .ok-button {
        padding: 4px 45px;
        height: 38px;
      }
      .cancel-button {
        .cancel-button-style();
      }
    }
  }
  .ant-layout-header {
    background: transparent;
    height: 108px !important;
    line-height: 108px !important;
  }
  .ant-menu-vertical > .ant-menu-item,
  .ant-menu-vertical-left > .ant-menu-item,
  .ant-menu-vertical-right > .ant-menu-item,
  .ant-menu-inline > .ant-menu-item,
  .ant-menu-vertical > .ant-menu-submenu > .ant-menu-submenu-title,
  .ant-menu-vertical-left > .ant-menu-submenu > .ant-menu-submenu-title,
  .ant-menu-vertical-right > .ant-menu-submenu > .ant-menu-submenu-title,
  .ant-menu-inline > .ant-menu-submenu > .ant-menu-submenu-title {
    height: 52px;
    line-height: 52px;
  }
  .ant-menu-inline .ant-menu-item {
    a {
      font-weight: 500;
      user-select: none;
    }
    margin-top: 5px;
    margin-bottom: 5px;
    &::after {
      content: none;
    }
    & > a > span {
      position: relative;
      z-index: 1;
    }
  }
  .entrance-guard-collapsed {
    .ant-layout-header {
      width: calc(100% - 84px) !important;
    }
    .ant-pro-sider .ant-menu-inline-collapsed .ant-menu-item {
      width: 84px;
    }
    .ant-pro-sider .ant-menu-inline-collapsed .ant-menu-submenu-title {
      width: 84px;
    }
    .ant-menu-inline-collapsed > .ant-menu-item .anticon {
      line-height: 52px;
    }
    .menu-item-icon {
      padding-left: 18px;
    }
  }
  .ant-menu-submenu {
    i {
      &::before {
        background: #939fba;
      }
      &::after {
        background: #939fba;
      }
    }
    &.ant-menu-submenu-selected .ant-menu-submenu-title i {
      &::before {
        background: #4877e6;
      }
      &::after {
        background: #4877e6;
      }
    }
    .ant-menu-submenu-title a {
      font-weight: 600;
      color: #a9adb7;
    }
    &.ant-menu-submenu-selected .ant-menu-submenu-title a {
      color: #4877e6;
    }
  }
  .ant-menu-item-only-child {
    a {
      color: #545b6d;
    }
  }
  .ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected {
    background-color: transparent;
  }
  button {
    border-radius: 4px;
  }
  .ant-pro-sider-light {
    box-shadow: 2px 0px 8px rgba(71, 119, 231, 0.15);
  }
  .ant-menu-submenu-placement-rightTop {
    .ant-menu-item-selected a,
    .ant-menu-item-selected a:hover {
      color: #4877e6;
    }
    .ant-menu {
      box-shadow: 0 1px 4px rgba(71, 119, 231, 0.15);
    }
  }
  .ant-layout-sider-children > div {
    &:nth-child(2) {
      padding-top: 35px;
    }
  }
  .ant-pro-basicLayout-content {
    margin: 0 16px 0px 16px;
    .scrollCommon();
  }
  .ant-pro-sider-links {
    display: none;
  }
  .ant-pro-sider-logo {
    padding: 0;
  }
  .ant-layout {
    background-color: #f0f3fa;
  }
}

.colorWeak {
  filter: invert(80%);
}

.ant-layout {
  min-height: 100vh;
}

canvas {
  display: block;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

ul,
ol {
  list-style: none;
}

@media (max-width: @screen-xs) {
  .ant-table {
    width: 100%;
    overflow-x: auto;
    &-thead > tr,
    &-tbody > tr {
      > th,
      > td {
        white-space: pre;
        > span {
          display: block;
        }
      }
    }
  }
}

// 兼容IE11
@media screen and(-ms-high-contrast: active), (-ms-high-contrast: none) {
  body .ant-design-pro > .ant-layout {
    min-height: 100vh;
  }
}
